# -*- coding: utf-8 -*-
# Copyright 2011 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from tipfy import HandlerPrefix, Rule


def get_rules(app):
    """Returns a list of URL rules for the Hello, World! application.

    :param app:
        The WSGI application instance.
    :return:
        A list of class:`tipfy.Rule` instances.
    """
    rules = [
        HandlerPrefix('apps.pf_mobile.handlers.', [
            Rule('/r', endpoint='redirect', handler='RedirectHandler'),
            Rule('/', endpoint='index', handler='IndexHandler'),
            Rule('/search', endpoint='search', handler='SearchHandler'),
            Rule('/view', endpoint='view', handler='ViewHandler'),
            Rule('/create', endpoint='create', handler='create.CreateHandler'),
            Rule('/add_note', endpoint='add_note', handler='add_note.AddNoteHandler'),
            Rule('/_warmup', endpoint='warmup', handler='IndexHandler'),
        ]),
    ]

    return rules
